﻿using Domain.Entity.Config;
using Domain.Repository.IConfig;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.AppService.Config
{
    public class Config_majorAppService : IConfig_majorAppService
    {
        private readonly IConfig_majorRepository cm;

        public Config_majorAppService(IConfig_majorRepository cm)
        {
            this.cm = cm;
        }
        //添加
        public Task<int> AddCMAsync(Config_major config_Major)
        {
            return cm.AddCMAsync(config_Major);
        }
        //删除
        public Task<int> DeleteCMAsync(int Id)
        {
            return cm.DeleteCMAsync(Id);
        }
        //查询所有
        public Task<List<Config_major>> GetCMAsync()
        {
            return cm.GetCMAsync();
        }

        public Task<List<Config_major>> GetCMAsyncById(string id)
        {
            return cm.GetCMAsyncById(id);
        }

        public  Task<Config_major> GetCMSAsyncById(string id)
        {
            return  cm.GetCMSAsyncById(id);
        }



        //修改
        public Task<int> UpdateCMAsync(Config_major config_Major)
        {
            return cm.UpdateCMAsync(config_Major);
        }

        
    }
}
